package utils;

import java.io.UnsupportedEncodingException;

public class StringUtil {
    public static String ToCN(String str){
        if(str == null)
            return null;
        try{
            str = new String(str.getBytes("iso8859-1"),"utf-8");
        }catch(UnsupportedEncodingException e) {

        }
        return str;
    }
    public static boolean isNullOrEmpty(String str){
        if(str == null || "".equals(str.trim()))
            return true;
        else
            return false;
    }
}
